In an existing computer system, a cheap and high-density dynamic random access memory (DRAM) is generally used as a system main memory, which is also referred to as a memory. The DRAM stores data using charges in a capacitor. However, these charges constantly leak away due to the existence of electric leakage. Therefore, data in the DRAM needs to be read and rewritten regularly, so as to compensate for charges that leak away, and such an operation is referred to as refresh.
The DRAM includes multiple banks, and each Bank is a two-dimensional storage array, where a horizontal line is referred to as a row, and a vertical line is referred to as a column. In a refresh process, the DRAM selects one row (which is also referred to as a memory row) each time, and extracts all data in the row to a sense amplifier (which is also referred to as a row buffer, Row Buffer); such a process is referred to as an activation operation. Then, the DRAM completes, in the row buffer, read and write of corresponding data, and data in the row buffer is rewritten into the storage array, which is referred to as a pre-charge operation. By means of the activation operation and the pre-charge operation, the whole refresh process is implemented. DRAM refresh causes relatively large overheads to a computer system. Because the DRAM cannot respond to a normal memory access request in the refresh process, performance overheads are caused; and besides, a refresh operation is a power-consuming operation, which causes energy consumption overheads.
An existing refresh method is to refresh all rows in the DRAM using a same cycle, so as to ensure that data in a unit suffering from the most severe electric leakage is not lost.
In a process of completing the present disclosure, it is found that the prior art has the following problems: As a capacity of the DRAM increases continuously, a manner of refreshing all memory rows using a same cycle has increasingly large performance overheads and energy consumption overheads, which significantly affects energy efficiency of a system.